﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ClipperHouse.jQuery.Base;
using System.Web.UI;

namespace ClipperHouse.jQuery
{
	class Click
	{
	}


	public static partial class Extensions
	{
		public static JQuery Click(this JQuery caller, JQuery jQuery)
		{
			if (caller is JQuery)
			{
				JQuery jqCaller = (caller as JQuery);
				jqCaller.TriggerEvent = TriggerEvent.Click;
				if (!String.IsNullOrEmpty(jQuery.Target))
				{
					jqCaller.ChildExpressions.Add(jQuery);
				}
				else
				{
					jqCaller.Chain.Add(jQuery);
				}
				return jqCaller;
			}

			return caller;
		}

	}
}
